This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 22, 2012, 1:52 PM
51 Posts
topic has been resolvedResolved

Java Exception

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: java.io.NotSerializableException: lotus.domino.local.Database lotus.domino.local.Database
  • Replies: 2
I created one xpage,i used one computed field to look up into the another database in the current server.
i gave this code in computed field..
 
var server=@Name('[CN]',@Subset(@DbName(),1));
var location=@Subset(@DbName(),-1);
var loc=@ReplaceSubstring(location,"db1.nsf","db2.nsf");
var exactloc=@ReplaceSubstring(loc,"\\","/");
var db=session.getDatabase(server,exactloc);
return db

 
It showing these error
 
The runtime has encountered an unexpected error.
Exception
java.io.NotSerializableException: lotus.domino.local.Database
lotus.domino.local.Database 
 
My server name is "lotus",and i hardcoded the name of server also..please anyone can suggest  a solution.
What is the error with "session.getDatabase(server,exactloc)"  and is it because of server name as "lotus".?
May 23, 2012, 6:51 AM
261 Posts
Re: Java Exception
The computed field is returning a NotesDatabase object and can't serialize that. That's why you get the exception.
 
Why do you want to return the NotesDatabase object in a computed field? If you change the last line in your compute field to
 
return db.getFilePath()
 
the error is probably gone.
 
Mark

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal